#!/bin/bash  -e

function info() {
echo Usage: `basename $0` cmd next_cmd
exit 65
}

while getopts  ":i:p:" opts
do
        case  $opts  in
        i) interval=$OPTARG;;
		p) out_prefix=$OPTARG;;
		*) info;;
        esac
done
shift $(($OPTIND - 1))


if [ $# -lt 3 ]; then info; fi

. /mnt/ilustre/app/medical/tools/.var

while true; do

if
cat $id_file |grep "$* done" > /dev/null

subq.sh -m$mem -p$cpu -n$name $cmd_next

break
fi

done
